/*
Autor: Alexander Savochkin, 2010
New BSD License
*/

#pragma once

/*
This project use boost.log library by Andrey Semashev.
*/

namespace SRCLF 
{
	// Here we define our application severity levels.
	enum severity_level
	{		
		normal,
		notification,
		warning,
		error,
		critical
	};

	// The formatting logic for the severity level
	template< typename CharT, typename TraitsT >
	inline std::basic_ostream< CharT, TraitsT >& operator<< (
		std::basic_ostream< CharT, TraitsT >& strm, severity_level lvl)
	{
		static const char* const str[] =
		{
			"normal",
			"notification",
			"warning",
			"error",
			"critical"
		};
		if (static_cast< std::size_t >(lvl) < (sizeof(str) / sizeof(*str)))
			strm << str[lvl];
		else
			strm << static_cast< int >(lvl);
		return strm;
	}
} //namespace SRCLF
